package o;

import com.huawei.appgallery.festivalanimation.particle.modifiers.SizeModifier;

public class fzf extends fzg implements Cloneable {
    static final /* synthetic */ boolean ˊ = (!fzf.class.desiredAssertionStatus());
    private final fzp ʻ = new fzp();
    public final fzp[] ˋ;
    public int ˎ = 0;
    public final fzp[] ˏ = new fzp[fzo.ˊॱ];
    private final fzp ͺ = new fzp();
    public final fzp ॱ = new fzp();
    private fzn ॱˊ = new fzn();
    private final fzp ॱॱ = new fzp();
    private final fzp ᐝ = new fzp();

    public /* synthetic */ Object clone() throws CloneNotSupportedException {
        return ˏ();
    }

    public fzf() {
        int i = 0;
        super(fze.POLYGON);
        for (int i2 = 0; i2 < this.ˏ.length; i2++) {
            this.ˏ[i2] = new fzp();
        }
        this.ˋ = new fzp[fzo.ˊॱ];
        while (i < this.ˋ.length) {
            this.ˋ[i] = new fzp();
            i++;
        }
        ˏ(fzo.ᐝॱ);
        this.ॱ.ˊ();
    }

    public final fzg ˏ() {
        fzg o_fzf = new fzf();
        o_fzf.ॱ.ॱ(this.ॱ);
        for (int i = 0; i < o_fzf.ˋ.length; i++) {
            o_fzf.ˋ[i].ॱ(this.ˋ[i]);
            o_fzf.ˏ[i].ॱ(this.ˏ[i]);
        }
        o_fzf.ˏ(ॱ());
        o_fzf.ˎ = this.ˎ;
        return o_fzf;
    }

    public final void ˏ(float f, float f2) {
        this.ˎ = 4;
        this.ˏ[0].ˎ(-f, -f2);
        this.ˏ[1].ˎ(f, -f2);
        this.ˏ[2].ˎ(f, f2);
        this.ˏ[3].ˎ(-f, f2);
        this.ˋ[0].ˎ(0.0f, (float) SizeModifier.STABLE_STATE_SCALE);
        this.ˋ[1].ˎ(1.0f, 0.0f);
        this.ˋ[2].ˎ(0.0f, 1.0f);
        this.ˋ[3].ˎ((float) SizeModifier.STABLE_STATE_SCALE, 0.0f);
        this.ॱ.ˊ();
    }

    public int ˊ() {
        return 1;
    }

    public final void ˋ(fyg o_fyg, fzn o_fzn, int i) {
        fzp o_fzp = o_fyg.ˋ;
        fzp o_fzp2 = o_fyg.ॱ;
        fzp o_fzp3 = this.ˏ[0];
        float f = o_fzn.ˏ.ˊ;
        float f2 = o_fzn.ˏ.ˏ;
        float f3 = o_fzn.ˊ.ˊ;
        float f4 = o_fzn.ˊ.ॱ;
        o_fzp.ˊ = ((o_fzp3.ˊ * f) - (o_fzp3.ॱ * f2)) + f3;
        o_fzp.ॱ = ((o_fzp3.ॱ * f) + (o_fzp3.ˊ * f2)) + f4;
        o_fzp2.ˊ = o_fzp.ˊ;
        o_fzp2.ॱ = o_fzp.ॱ;
        for (int i2 = 1; i2 < this.ˎ; i2++) {
            float f5;
            fzp o_fzp4 = this.ˏ[i2];
            float f6 = ((o_fzp4.ˊ * f) - (o_fzp4.ॱ * f2)) + f3;
            float f7 = ((o_fzp4.ॱ * f) + (o_fzp4.ˊ * f2)) + f4;
            if (o_fzp.ˊ < f6) {
                f5 = o_fzp.ˊ;
            } else {
                f5 = f6;
            }
            o_fzp.ˊ = f5;
            if (o_fzp.ॱ < f7) {
                f5 = o_fzp.ॱ;
            } else {
                f5 = f7;
            }
            o_fzp.ॱ = f5;
            if (o_fzp2.ˊ > f6) {
                f6 = o_fzp2.ˊ;
            }
            o_fzp2.ˊ = f6;
            if (o_fzp2.ॱ > f7) {
                f7 = o_fzp2.ॱ;
            }
            o_fzp2.ॱ = f7;
        }
        o_fzp.ˊ -= this.ʼ;
        o_fzp.ॱ -= this.ʼ;
        o_fzp2.ˊ += this.ʼ;
        o_fzp2.ॱ += this.ʼ;
    }

    public void ˊ(fzb o_fzb, float f) {
        if (ˊ || this.ˎ >= 3) {
            int i;
            fzp o_fzp = this.ʻ;
            o_fzp.ˊ();
            float f2 = 0.0f;
            float f3 = 0.0f;
            fzp o_fzp2 = this.ॱॱ;
            o_fzp2.ˊ();
            for (i = 0; i < this.ˎ; i++) {
                o_fzp2.ˏ(this.ˏ[i]);
            }
            o_fzp2.ˊ(1.0f / ((float) this.ˎ));
            fzp o_fzp3 = this.ᐝ;
            fzp o_fzp4 = this.ͺ;
            for (i = 0; i < this.ˎ; i++) {
                fzp o_fzp5;
                o_fzp3.ॱ(this.ˏ[i]).ˎ(o_fzp2);
                fzp ˎ = o_fzp4.ॱ(o_fzp2).ˎ();
                if (i + 1 < this.ˎ) {
                    o_fzp5 = this.ˏ[i + 1];
                } else {
                    o_fzp5 = this.ˏ[0];
                }
                ˎ.ˏ(o_fzp5);
                float ॱ = fzp.ॱ(o_fzp3, o_fzp4);
                float f4 = 0.5f * ॱ;
                f2 += f4;
                o_fzp.ˊ += (0.33333334f * f4) * (o_fzp3.ˊ + o_fzp4.ˊ);
                o_fzp.ॱ = ((f4 * 0.33333334f) * (o_fzp3.ॱ + o_fzp4.ॱ)) + o_fzp.ॱ;
                f4 = o_fzp3.ˊ;
                float f5 = o_fzp3.ॱ;
                float f6 = o_fzp4.ˊ;
                float f7 = o_fzp4.ॱ;
                f3 += (ॱ * 0.083333336f) * ((((f4 * f6) + (f4 * f4)) + (f6 * f6)) + (((f5 * f7) + (f5 * f5)) + (f7 * f7)));
            }
            o_fzb.ॱ = f * f2;
            if (ˊ || f2 > 1.1920929E-7f) {
                o_fzp.ˊ(1.0f / f2);
                o_fzb.ˏ.ॱ(o_fzp).ˏ(o_fzp2);
                o_fzb.ˎ = f3 * f;
                o_fzb.ˎ += o_fzb.ॱ * fzp.ˎ(o_fzb.ˏ, o_fzb.ˏ);
                return;
            }
            throw new AssertionError();
        }
        throw new AssertionError();
    }
}
